var ctxPath = "/education";

!function ($) {

    $("#learnmore").click(function () {
        var request={};
        request.name = $("input[name='name']").val();
        request.mobile = $("input[name='mobile']").val();
        if(null == request.name || "" == request.name){
            alert("请输入咨询人姓名！");
            return;
        }
        if(null == request.mobile || "" == request.mobile || !(/^1[3|4|5|6|7|8|9]\d{5,9}$/.test(request.mobile))){
            alert("请输入正确的手机号！");
            return;
        }
        $.ajax({
            url: ctxPath + '/wx/api/contact/createContactInfo',
            type: 'post',
            contentType: "application/json",
            dataType: 'json',
            data: JSON.stringify(request),
            success: function (result) {
                alert("感谢您的关注，我们将在1个工作日内与您取得联系")
            }

        })
    })
    }(jQuery);